package cn.com.dbappsecurity.controller;

import org.apache.log4j.Logger;

import cn.com.dbappsecurity.frame.proxy.FrameProxy;

/**
 * 控制器基类
 * @author dhz
 */
public class BaseController {
	
	protected static Logger LOG = Logger.getLogger(BaseController.class);
	
	protected BaseController(){
	}
	
	protected <T> T getService(Class<T> clasz){
		try {
			return FrameProxy.newProxyServiceInstance(clasz.newInstance());
		} catch (Exception e) {
			LOG.error("创建实例["+clasz.getName()+"]出错",e);
		}
		return null;
	}
}
